from rest_framework import serializers

from pingtuan.models import Users, Tasks, UserConnection


class UsersSerializer(serializers.ModelSerializer):

    class Meta:
        model = Users
        fields = "__all__"
        update_time = serializers.DateTimeField(format='%Y-%m-%d %H:%M:%S')


class TasksSerializer(serializers.ModelSerializer):
    class Meta:
        model = Tasks
        fields = "__all__"

class UserConSerializer(serializers.ModelSerializer):
    class Meta:
        model = UserConnection
        fields = "__all__"
